<template>
  <div class="header">
      <div>
    <van-nav-bar
      title="法律条款及隐私政策"
      style="background: #fff;"
      left-arrow
      @click-left="onClickLeft"

    />
    </div>

    <div class="conten-text">

      <van-cell class="textlaw"
                v-for="(item,i) in items"
                :key="i"
                :title="item.title" @click="to_detail(item.uaId)"  is-link />




    </div>
  </div>
</template>
<script>
    export default{

        data() {
          return {
              items:[]
          }
        },
        mounted:function(){
            const that = this;
            that.all_agreement();
        },
        methods:{
            all_agreement(){
                const that = this;
                that.$sendRequest('/sys/all_agreement',"").then(function(res){
                    console.log(res);
                    that.items = res.data.result.uas;
                })
            },
           onClickLeft(){
               this.$router.back(-1);
           },
            to_detail(uaId){
                let that = this;
                that.$router.push({
                    path: '/h5',query:{url:"/sys/agreement_detail?uaId="+uaId}
                })
            }
        }
    }


     </script>
<style scoped="scoped">
.textlaw{
  text-align: left;
  margin: 1vw;
}
.header >>> .van-icon-arrow-left{
  color: #2c3e50;
}

</style>
